import axios from 'axios'
const instance = axios.create({
    baseURL: 'https://api.it120.cc/small4',
    timeout: 5000,
})


// 请求轮播
export const getBanner = () => instance('/banner/list')
//人气列表
export const getPersonList = () => instance('/shop/goods/list')
// 分类列表
export const getClassifyList = () => instance('/shop/goods/category/all')
// 详情页数据
export const getDetailData = (id) => instance(`/shop/goods/detail?id=${id}`)
// 商品评价的接口
export const getEvaluateData = (id) => instance({
    url: '/shop/goods/reputation',
    method: 'POST',
    params: {
        goodsId: id
    }
})
// 登录接口
export const login = (params) => instance({
    url: '/user/m/login?deviceId=007&deviceName=monkey',
    method: 'POST',
    params: params
})